package com.sugar.web.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @标题：基础Action
 * @描述：
 * @编写者：杨浩泉
 * @日期：2011-9-7 <b>下午08:26:18</b>
 */
public class BaseActionSupport extends ActionSupport implements ServletRequestAware,ServletResponseAware {

	private static final long serialVersionUID = 1L;
	
	private HttpServletRequest request ;
	
	private HttpServletResponse response ;
	
	public HttpServletResponse getResponse() {
		return response;
	}

	public void setResponse(HttpServletResponse response) {
		this.response = response;
	}

	public HttpServletRequest getRequest() {
		return request;
	}

	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}

	@Override
	public String execute() throws Exception {
		return super.execute();
	}

	@Override
	public void setServletRequest(HttpServletRequest request) {
		this.request = request ;
	}

	@Override
	public void setServletResponse(HttpServletResponse response) {
		this.response = response ;
	}

}
